/**
 * @Title: VideoTeachingController.java
 * @Description: TODO(用一句话描述该文件做什么)
 * @author 张鑫
 * @phone 17561783855
 * @date 2019年6月22日
 */
package com.fortune.rainshineservice.controller;

import com.fortune.rainshinecommon.base.MsgModel;
import com.fortune.rainshinecommon.model.service.VideoTeachingModel;
import com.fortune.rainshineservice.service.VideoTeachingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName: VideoTeachingController
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author 张鑫
 * @phone 17561783855
 * @date 2019年6月22日
 *
 */
@RestController
@RequestMapping("/video")
public class VideoTeachingController {
    @Autowired
    private VideoTeachingService service;

    @PostMapping("/add")
    public MsgModel add(@RequestBody VideoTeachingModel model) {
        return service.createShop(model);
    }

    @PostMapping("/list")
    public List<VideoTeachingModel> list() {
        return service.list();
    }

    @PostMapping("/delete")
    public MsgModel delete(@RequestBody VideoTeachingModel productModel) {
        return service.delete(productModel);
    }
}
